// 品牌管理数据
import request from '@/utils/request'
// 获取列表展示数据 /admin/product/baseTrademark/{page}/{limit}
export const reqTradeMarkList = (page, limit) => request({ url: `/admin/product/baseTrademark/${page}/${limit}`, method: 'get' })

// 添加品牌  /admin/product/baseTrademark/save   post  传递品牌名称 和品牌logo
// 修改品牌  /admin/product/baseTrademark/update  put  传递品牌id 品牌logo 和id
export const reqAddOrUpdateTradeMark = (tradeMark) => {
    // 如果带有id则是修改
    if (tradeMark.id) {
        return request({ url: '/admin/product/baseTrademark/update', method: 'put', data: tradeMark });
    } else {
        return request({ url: '/admin/product/baseTrademark/save', method: 'post', data: tradeMark });
    }   
}

// 删除品牌 /admin/product/baseTrademark/remove/${id}  delete 传递id
export const reqDeletTardeMark = (id) => request({ url: `/admin/product/baseTrademark/remove/${id}`, method: 'delete' });
